Developer Documentation
PATH  WebObjects 4.5 Documentation > Getting Started With Direct to Java Client

   

Configuring the Unit Pane of the Query Window

The Unit pane allows you to search for units by unit ID, date acquired, movie name, and movie release date. It seems unlikely that users will want to search for particular units by movie release date, so you'll remove it.

Note that the query property keys for Unit are unitID, dateAcquired, and video. Through the video key, Direct to Java Client gets both a movie name and movie release date (which correspond to the Movie identify property keys). You want to keep the movie name in the interface, but not the movie release date.

  1. Remove video from the property keys.

    Using the video key, you can't get one identify Movie property without the other one, so remove it. You'll add the Movie name property to the query interface another way.

  2. Add video.movie.title to the property keys.

    At the bottom of the Assistant Properties pane, there's a field labeled "Additional Property Key Path". In this field, type video.movie.title, and click Add.

  3. Save and restart to observe these changes.

    Adding key paths to an entity's property keys flattens attributes into the entity for display purposes: the attribute identified by the key path is treated in the user interface as if it's one of the entity's own attributes rather than an attribute of a related entity.

  4. Change the label for video.movie.title.

    The label for video.movie.title, "Video Movie Title", seems unnecessarily wordy. "Movie Title" would be better.

    Select the Widgets tab in the Assistant. Set the Task pull-down list to <ALL> if it isn't already, then select video.movie.title in the Property Key pull-down list. In the Label field, delete the word "Video" so the label is simply "Movie Title".

  5. Save and restart to observe this change.

    Notice that the movie title label is now "Movie Title" for both the search field and for the column in the results table. To set one, but not the other, you would simply set the Task pull-down list to the appropriate task before making the change.

  6. Examine Unit's list properties.

    The notes property contains free-form text, and doesn't display well in a list, so remove notes from Unit's list property keys.

Move on to the next pane.


© 1999 Apple Computer, Inc. – (Draft. Last updated 05 Jan 00)